<h1>Listing code_files</h1>

<table>
  <tr>
    <th>Name</th>
    <th>View</th>
    <th>Code</th>
  </tr>

<% for code_file in @code_files %>
  <tr>
    <td><%=h code_file.name %></td>
    <td><%=h code_file.view %></td>
    <td><%=h code_file.code.length %> bytes</td>
    <td><%= link_to 'Edit', edit_widget_code_file_path(@widget, code_file) %></td>
    <td><%= link_to 'Destroy', widget_code_file_path(@widget, code_file), :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New code_file', new_widget_code_file_path(@widget) %>
